<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>员工信息列表</title>
	
	<style>
		*{	margin: 0 auto;
			padding：0px；
		}
		h1{
			text-align: center;
			margin-top: 20px;
		}
		tr{border:3px;border-color: red; height:50px;}
			#page
        	{
            	width: 500px;
            	height: 100px;
        	}
			#page li
        	{
            	float: left;
            	margin: 5px 5px;
            	padding: 4px 5px;
            	border: 1px solid #D5D9DC;
            	list-style: none;	
        	}
        		#page li.last
        	{
            	text-decoration: none;
            	border: none;
        	}
        		#page li a{
            	text-decoration: none;
            	color: #050505;
        	}
        		#page li:hover{
            	background-color: #fe7300;            
        	}
        		#page li:hover a{
            	color: white;
        	}
        		#page li.last:hover
        	{
          		background-color:white;
        	}
        		#DDD{
				width: 1800px;
				height: 50px;
				
				text-align: center;
        		}
        		#DDD .f input{
        			margin:20px 0px 0px 820px;
					border: 2px solid #f43610;
        		}
	</style>
</head>
<body>
   
<h1>员工信息列表</h1><br>
<div id="DDD">
<form action="" method="get">
						<p>快速查询：<input type="text" name="search"/>                            
                            <input type="submit" value="搜索"/></p>  
                        </form>           
    <span class="f"><a href="TJ.php"><input type="button" value="添加员工"/></a></span>
	</div>	

	<table border="1" width="50%" cellspacing="0" border-color="blue"><br>   
		<tr style="background:#1341d6"  > 
			<th>ID</th>
			<th>姓名</th>
			<th>所属部门</th>
			<th>头像</th>
			<th>出生日期</th>
			<th>入职时间</th>
			<th>相关操作</th>
		</tr>
		<?php
			foreach($DD as $D)
	{
		?>
		<tr>
			<th><?php echo $D["e_id"]?></th>
			<th><?php echo $D["e_name"]?></th>
			<th><?php echo $D["e_dept"]?></th>
			<th><img src='<?php echo $D["e_img"]?>'.jpg></th>
			<th><?php echo $D["date_of_birth"]?></th>
			<th><?php echo $D["date_of_entry"]?></th>
			<th>
				<a class="edit_a" href="javascript:location.href='bbsupdate.php?id=<?php echo $D["e_id"]?>'">编辑</a>
				
				<a class="delete" href="javascript:" onclick="if(confirm('确定删除吗？')) location.href='bbsdel.php?id=<?php echo $D['e_id']?>'" >删除</a>
				
			</th>
		</tr>
		<?php
	}
	?>
	</table>
<!-- 分页 -->
		
				<ul id="page">
                            <?php 
                              if (($page-1)>0)  
                                  $pre=$page-1;
                              else $pre=1;
                              if (($page+1)<$maxpage)
                                  $next=$page+1;
                              else 
                                  $next=$maxpage;
                            ?>
                            <li ><a href="LJ.php?page=1">首  页</a></li>
                            <li><a href="LJ.php?page=<?php echo $pre; ?>">上一页</a></li>
                            <li><a href="LJ.php?page=<?php echo $next; ?>">下一页</a></li>
                            <li><a href="LJ.php?page=<?php echo $maxpage; ?>">末  页</a></li>
                            <li class="last">当前第<?php echo $page; ?>页/共<?php echo $maxpage; ?>页</li>
                            <li >
                        </ul>
			

</body>
</html>

	